package NiuKe.JianZhiOffer;

import java.util.Stack;

public class JZ1 {
    public static void main(String[] args) {
        int a[][] = {{}};
        JZ1 jz = new JZ1();
        System.out.println();jz.Find(16,a);

    }
    public boolean Find(int target, int [][] array) {
        for (int i = 0 ; i < array.length ; i++){

            if( array[i].length == 0 || array[i][0] > target )return false;

            if( array[i][array[i].length-1] < target)continue;

            for( int j = 0 ; j < array.length ; j++ ){
                if( array[i][j] > target )break;
                if( array[i][j] == target )return true ;
            }

        }
        return false;
    }
}
